import request from '@/utils/request'
export function shop(params) {
  return request({
    url: '/admin/shop/lbsList',
    method: 'get',
    params: params
  })
}
export function list(params) {
  return request({
    url: '/admin/product/list',
    method: 'get',
    params: params
  })
}

export function productList(params) {
  return request({
    url: '/product/list',
    method: 'get',
    params: params
  })
}

export function save(data,params) {
  return request({
    url:'/admin/product/save',
    method: 'post',
    data:data,
    params: params
  })
}
export function find(id) {
  return request({
    url:'/admin/product/find/'+id,
    method: 'get',
  })
}

export function update(data,params) {
  return request({
    url: '/admin/product/update',
    method: 'post',
    data: data,
    params: params
  })
}


export function updateProduct(data,params) {
  return request({
    url: '/admin/product/updateProduct',
    method: 'post',
    data: data,
    params: params
  })
}
export function del(ids) {
  return request({
    url: '/admin/product/del/' + ids,
    method: 'post'
  })
}

export function findBySn(params) {
  return request({
    url: '/admin/product/findBySn',
    method: 'get',
    params: params
  })
}

export function copyProduct(params) {
  return request({
    url: '/admin/product/copyProduct',
    method: 'post',
    params: params
  })
}
export function upload(data) {
  return request({
    url: '/admin/product/upload',
    method: 'post',
    data:data
  })
}
export function BatchUpdate(data) {
  return request({
    url: '/admin/product/BatchUpdate',
    method: 'post',
    data:data
  })
}


